{extend name="base/main" /}
{block name="body"}
<blockquote class="layui-elem-quote">

</blockquote>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  <div class="layui-form-item">
    <div class="layui-input-inline" style="margin-left: 50px">
      <select name="city" lay-verify="required" style="width: 100px; height: 35px">
        <option value="0">是否可用</option>
        <option value="1">显示</option>
        <option value="2" selected>不显示</option>
      </select>
    </div>
    <a type="button" class="layui-btn layui-btn-normal">搜索</a>
  </div>
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="150">
      <col width="150">
      <col width="200">
      <col>
    </colgroup>
    <thead>
    <tr>
      <th>订单号</th>
      <th>用户信息</th>
      <th>商品信息</th>
      <th>推广人</th>
      <th>上级推广人</th>
      <th>实际支付</th>
      <th>支付状态</th>
      <th>订单状态</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="vo"}
    <tr>
      <td>{$vo.order}</td>
      <td>{$vo.user}</td>
      <td>{$vo.goods}</td>
      <td>{$vo.promter}</td>
      <td>{$vo.top_promter}</td>
      <td>{$vo.payment}</td>
      <td>
        <?php if($vo['pay_status'] == 1){ ?>
        <i class="fa fa-check text-navy"></i>
        <?php }else{ ?>
        <i class="fa fa-check fa-close"></i>
        <?php } ?>
      </td>
      <td>
        <?php if($vo['order_status'] == 1){ ?>
        <i class="fa fa-check text-navy"></i>
        <?php }else{ ?>
        <i class="fa fa-check fa-close"></i>
        <?php } ?>
      </td>
      <td>
            <div class="dropdown" style="display: inline-block;">
              <button data-toggle="dropdown" class="btn btn-success btn-xs dropdown-toggle layui-btn">
                <i class="fa fa-chevron-down "></i> 更多
              </button>
              <ul class="dropdown-menu m-t-xs">
                <li><div id="layerDemo" style="margin-bottom: 0;">
                  <button data-method="offset" data-type="auto" class="layui-btn layui-btn-normal">订单备注</button>
                </div></li>
                <li><a href="{:url('order/type_index')}"><i class="fa fa-bars"></i>&nbsp;&nbsp;订单记录</a></li>
                <li><a href="{:url('order/type_index')}"><i class="fa fa-bars"></i>&nbsp;&nbsp;订单详情</a></li>
              </ul>
        </div>
      </td>
    </tr>
    {/volist}
    </tbody>
  </table>
</div>
<script>
  layui.use('layer', function(){ //独立版的layer无需执行这一句
    var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
    //触发事件
    var active = {
      offset: function(othis){
        var type = othis.data('type')
                ,text = othis.text();
        //默认prompt
        layer.prompt(function(val, index){
          layer.msg('备注成功'+val);
          layer.close(index);
          bt
        });
      }
    };
    $('#layerDemo .layui-btn').on('click', function(){
      var othis = $(this), method = othis.data('method');
      active[method] ? active[method].call(this, othis) : '';
    });
  });
</script>
{/block}